from die import Die
import plotly.express as px

die = Die()
results = []
for roll_num in range(1):
    result = die.roll()
    results.append(result)
# print(results)

frequencies = []
poss_results = range(1, die.num_sides+1)
for value in poss_results:
    frequency = results.count(value)
    frequencies.append(frequency)
# print(frequencies)
title = "results of rolling one D6 1000 times"
labels = {'x': 'result', 'y': 'frequency of result'}
fig = px.bar(x=poss_results, y=frequencies, title=title, labels=labels)
fig.show()
